<template>
	<view class="p20">
		<view class="radius20 p30 mb20 bg-fff flex">
			<view class="color-999 flex1">当前版本</view>
			<view class="">V{{$u.sys().appVersion}}_{{$u.sys().appVersionCode}}</view>
		</view>
		<view class="radius20 p30 mb20 bg-fff flex" @click="up">
			<view class="color-999 flex1">检查更新</view>
			<u-icon name="arrow-right" class="ml10 pe-none" />
		</view>
		<view class="radius20 p30 mb20 bg-fff flex" @click="$u.route('/pages/index/selectIdentity/selectIdentity')">
			<view class="color-999 flex1">切换身份</view>
			<view class="" v-if="$user.identity">当前{{$list('identity')[$user.identity]}}</view>
			<u-icon name="arrow-right" class="ml10 pe-none" />
		</view>
		<!-- #ifndef MP-WEIXIN -->
		<view class="h120"></view>
		<view class="pf bottom0 left0  w-max">
			<view class="p20">
				<u-button type="warning" ripple @click="$logOut">退出登录</u-button>
			</view>
		</view>
		<!-- #endif -->
	</view>
</template>

<script>
	import update from '@/common/update.js'
	export default {
		data() {
			return {

			};
		},
		methods: {
			up() {
				// #ifndef APP-PLUS
				this.$msg('已是最新版本')
				return
				// #endif
				this.$once('update', e => {
					if (data.data.code != 200) { //不等于200 则不更新
						this.$msg('已是最新版本')
					}
				})
				update(this.$baseUrl)
			}
		}
	}
</script>

<style lang="scss">

</style>
